'use client'

import * as React from 'react'
import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet'
import 'leaflet/dist/leaflet.css'

interface FarmMapProps {
  // 可根据需求添加定位数据等props
}

const FarmMap: React.FC<FarmMapProps> = () => (
  <MapContainer center={[30.123, 120.456]} zoom={13} style={{ width: '100%', height: '300px' }}>
    <TileLayer url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" />
    <Marker position={[30.123, 120.456]}>
      <Popup>农场位置</Popup>
    </Marker>
  </MapContainer>
)

export default FarmMap